package org.wgc.study;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.JobParametersBuilder;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;

import java.util.Date;

/**
 * @author: 小强崽
 * @create: 2020/11/27 9:46
 * @description:
 **/
@SpringBootApplication
@MapperScan({"org.wgc.study.mapper"})
@EnableCaching
@EnableBatchProcessing
public class MybatiesPlusBatchApplication  {

    public static void main(String[] args) {
        SpringApplication.run(MybatiesPlusBatchApplication.class, args);
    }
    /*@Autowired
    private JobLauncher jobLauncher;

    @Autowired
    private Job bankReconciliationJob;
    @Override
    public void run(String... args)throws Exception {
        JobParameters params=new JobParametersBuilder()
                .addString("inputFile", "classpath:trans-20230520.csv")
                .addDate("runDate", new Date())
                .toJobParameters();

        jobLauncher.run(bankReconciliationJob, params);
    }*/
}
